﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using PivotViewerBase.Web;

namespace PivotViewerBase
{
    public partial class ChildWindow1 : ChildWindow
    {
        public ChildWindow1()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void joiningTwoUnequalTables2DomainDataSource_LoadedData_1(object sender, LoadedDataEventArgs e)
        {

            if (e.HasError)
            {
                System.Windows.MessageBox.Show(e.Error.ToString(), "Load Error", System.Windows.MessageBoxButton.OK);
                e.MarkErrorAsHandled();
            }
        }

        private void joiningTwoUnequalTables2DataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            JoiningTwoUnequalTables2 dr = e.Row.DataContext as JoiningTwoUnequalTables2;

            if (dr.m_serial_no % 2 == 1)
                e.Row.Background = new SolidColorBrush(Colors.LightGray);

        }
    }
}

